package com.hand.demo.infra.repository.impl;

import org.apache.commons.collections.CollectionUtils;
import org.hzero.mybatis.base.impl.BaseRepositoryImpl;
import org.springframework.stereotype.Component;
import com.hand.demo.domain.entity.HhrTaLang;
import com.hand.demo.domain.repository.HhrTaLangRepository;
import com.hand.demo.infra.mapper.HhrTaLangMapper;

import javax.annotation.Resource;
import java.util.List;

/**
 * 语言证书表(HhrTaLang)资源库
 *
 * @author
 * @since 2025-06-16 12:16:53
 */
@Component
public class HhrTaLangRepositoryImpl extends BaseRepositoryImpl<HhrTaLang> implements HhrTaLangRepository {
    @Resource
    private HhrTaLangMapper hhrTaLangMapper;

    @Override
    public List<HhrTaLang> selectList(HhrTaLang hhrTaLang) {
        return hhrTaLangMapper.selectList(hhrTaLang);
    }

    @Override
    public HhrTaLang selectByPrimary(Long id) {
        HhrTaLang hhrTaLang = new HhrTaLang();
        hhrTaLang.setId(id);
        List<HhrTaLang> hhrTaLangs = hhrTaLangMapper.selectList(hhrTaLang);
        if (hhrTaLangs.size() == 0) {
            return null;
        }
        return hhrTaLangs.get(0);
    }

}

